class Study(object):

    def __init__(self, rate = 0.01):
        self.rate = rate

    def growRateDay(self, i):
        if (i % 7 < 3):
            return 1
        return (1 + self.rate)

    def growRate(self, n):
        total = 1
        for i in range(n):
            total = total * self.growRateDay(i)
        return total
    
    def growDateRest(self, n, rest_period):
        total = 1
        for i in range(n):
            if (i % rest_period == rest_period - 1):
                continue
            total = total * self.growRateDay(i % rest_period)
        return total

study = Study()

print(study.growDateRest(365, 15))
